<h1>Listing companies</h1>

<table>
  <tr>
    <th>Name</th>
    <th>E-mail</th>
    <th>City</th>
    <th>State</th>
    <th>Site</th>
    <th>Twitter</th>
  </tr>

<% @companies.each do |company| %>
  <tr>
    <td><%=h company.name %></td>
    <td><%=h company.email %></td>
    <td><%=h company.city %></td>
    <td><%=h company.state_id %></td>
    <td><%=h company.site %></td>
    <td><%=h company.twitter %></td>
    <td><%= link_to 'Mostrar', company %></td>
    <td><%= link_to 'Editar', edit_company_path(company) %></td>
    <td><%= link_to 'Excluir', company, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New company', new_company_path %>